mirror of
https://github.com/DerTyp7/explainegy-nextjs.git
synced 2025-10-29 21:02:13 +01:00
components folder
This commit is contained in:
@@ -13,8 +13,8 @@ import { IContentTableEntry } from "../../../../../types/contentTable";
|
|||||||
import { CreateArticle, UpdateArticle } from "../../../../../types/api";
|
import { CreateArticle, UpdateArticle } from "../../../../../types/api";
|
||||||
import { formatTextToUrlName } from "../../../../../utils";
|
import { formatTextToUrlName } from "../../../../../utils";
|
||||||
import { isValidText } from "../../../../../validators";
|
import { isValidText } from "../../../../../validators";
|
||||||
import { apiUrl } from "../../../../global";
|
import { apiUrl } from "../../../../../global";
|
||||||
import Markdown from "../../../../Markdown";
|
import Markdown from "../../../../../components/Markdown";
|
||||||
|
|
||||||
type ArticleWithCategory = Prisma.ArticleGetPayload<{ include: { category: true } }>;
|
type ArticleWithCategory = Prisma.ArticleGetPayload<{ include: { category: true } }>;
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { CreateCategory, UpdateCategory } from "../../../../../types/api";
|
|||||||
import urlJoin from "url-join";
|
import urlJoin from "url-join";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { apiUrl } from "../../../../global";
|
import { apiUrl } from "../../../../../global";
|
||||||
|
|
||||||
type CategoryWithSvg = Prisma.CategoryGetPayload<{ include: { svg: true } }>;
|
type CategoryWithSvg = Prisma.CategoryGetPayload<{ include: { svg: true } }>;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from "react";
|
|||||||
import { Image } from "@prisma/client";
|
import { Image } from "@prisma/client";
|
||||||
import { Image as GalleryImage } from "react-grid-gallery";
|
import { Image as GalleryImage } from "react-grid-gallery";
|
||||||
import urlJoin from "url-join";
|
import urlJoin from "url-join";
|
||||||
import { apiUrl } from "../../global";
|
import { apiUrl } from "../../../global";
|
||||||
import Gallery from "./Gallery";
|
import Gallery from "./Gallery";
|
||||||
|
|
||||||
async function getImages(): Promise<GalleryImage[]> {
|
async function getImages(): Promise<GalleryImage[]> {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import Sidebar from "./Sidebar";
|
|||||||
import styles from "../../../../styles/modules/Article.module.scss";
|
import styles from "../../../../styles/modules/Article.module.scss";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import urlJoin from "url-join";
|
import urlJoin from "url-join";
|
||||||
import { apiUrl } from "../../../global";
|
import { apiUrl } from "../../../../global";
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "@prisma/client";
|
||||||
import Markdown from "../../../Markdown";
|
import Markdown from "../../../../components/Markdown";
|
||||||
import { IContentTableEntry } from "../../../../types/contentTable";
|
import { IContentTableEntry } from "../../../../types/contentTable";
|
||||||
|
|
||||||
type ArticleWithIncludes = Prisma.ArticleGetPayload<{
|
type ArticleWithIncludes = Prisma.ArticleGetPayload<{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import styles from "../../../styles/modules/Category.module.scss";
|
import styles from "../../../styles/modules/Category.module.scss";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { apiUrl } from "../../global";
|
import { apiUrl } from "../../../global";
|
||||||
import { Article, Category } from "@prisma/client";
|
import { Article, Category } from "@prisma/client";
|
||||||
import urlJoin from "url-join";
|
import urlJoin from "url-join";
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import styles from "../../styles/modules/CategoryList.module.scss";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { Category, Svg, Prisma } from "@prisma/client";
|
import { Category, Svg, Prisma } from "@prisma/client";
|
||||||
import urlJoin from "url-join";
|
import urlJoin from "url-join";
|
||||||
import { apiUrl } from "../global";
|
import { apiUrl } from "../../global";
|
||||||
|
|
||||||
type CategoryWithSvg = Prisma.CategoryGetPayload<{ include: { svg: true } }>;
|
type CategoryWithSvg = Prisma.CategoryGetPayload<{ include: { svg: true } }>;
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import "../styles/globals.scss";
|
import "../styles/globals.scss";
|
||||||
import "../styles/variables_colors.scss";
|
import "../styles/variables_colors.scss";
|
||||||
import "../styles/variables.scss";
|
import "../styles/variables.scss";
|
||||||
import Nav from "./Nav";
|
|
||||||
import Footer from "./Footer";
|
|
||||||
import { Category } from "@prisma/client";
|
import { Category } from "@prisma/client";
|
||||||
import urlJoin from "url-join";
|
import urlJoin from "url-join";
|
||||||
import { apiUrl } from "./global";
|
import { apiUrl } from "../global";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import Footer from "../components/Footer";
|
||||||
|
import Nav from "../components/Nav";
|
||||||
|
|
||||||
async function getCategories(): Promise<Category[]> {
|
async function getCategories(): Promise<Category[]> {
|
||||||
const result: Response = await fetch(urlJoin(apiUrl, `categories`), {
|
const result: Response = await fetch(urlJoin(apiUrl, `categories`), {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import remarkStringify from "remark-stringify";
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { useLocalStorage } from "usehooks-ts";
|
import { useLocalStorage } from "usehooks-ts";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import Head from "./head";
|
import Head from "../app/head";
|
||||||
import { formatTextToUrlName } from "../utils";
|
import { formatTextToUrlName } from "../utils";
|
||||||
|
|
||||||
function flatten(text, child) {
|
function flatten(text, child) {
|
||||||
Reference in New Issue
Block a user