upd
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
# production
|
# production
|
||||||
/build
|
/build
|
||||||
|
/dist
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
+11
-2
@@ -18,10 +18,19 @@ server {
|
|||||||
|
|
||||||
# index.html fallback
|
# index.html fallback
|
||||||
location / {
|
location / {
|
||||||
# try_files $uri $uri/ /index.html;
|
# Убираем trailing slash и редиректим
|
||||||
try_files $uri $uri.html $uri/ /index.html;
|
rewrite ^/(.*)/$ /$1 permanent;
|
||||||
|
|
||||||
|
# Пробуем найти файл, затем с .html, затем 404
|
||||||
|
try_files $uri $uri.html /404.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Явная обработка 404
|
||||||
|
# error_page 404 /404.html;
|
||||||
|
# location = /404.html {
|
||||||
|
# internal;
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
location /api {
|
location /api {
|
||||||
rewrite ^/api/(.*)$ /$1 break;
|
rewrite ^/api/(.*)$ /$1 break;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { redirect, RedirectType } from "next/navigation";
|
|
||||||
import MainLayout from "./(main)/layout";
|
import MainLayout from "./(main)/layout";
|
||||||
import { NotFoundPage } from "@/components/pages/NotFoundPage";
|
import { NotFoundPage } from "@/components/pages/NotFoundPage";
|
||||||
|
|
||||||
export default function Page() {
|
export default function NotFound() {
|
||||||
return (
|
return (
|
||||||
<MainLayout>
|
<MainLayout>
|
||||||
<NotFoundPage />
|
<NotFoundPage />
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function StoriesButton() {
|
|||||||
return (
|
return (
|
||||||
<div className="flex items-center mx-auto">
|
<div className="flex items-center mx-auto">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
{stories?.slice(-3).map(({ id, text, preview }, index) => (
|
{stories?.slice(0,3).map(({ id, text, preview }, index) => (
|
||||||
<button
|
<button
|
||||||
onClick={() => setModal(<StoriesModal startIndex={index} />)}
|
onClick={() => setModal(<StoriesModal startIndex={index} />)}
|
||||||
className="aspect-square first:translate-x-2 last:-translate-x-2 w-full rounded-full cursor-pointer outline-none"
|
className="aspect-square first:translate-x-2 last:-translate-x-2 w-full rounded-full cursor-pointer outline-none"
|
||||||
|
|||||||
Reference in New Issue
Block a user