-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from vevcom/feat/Article
Feat/article-2
- Loading branch information
Showing
26 changed files
with
687 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use server' | ||
import prisma from '@/prisma' | ||
import errorHandler from '@/prisma/errorHandler' | ||
import { ActionReturn } from '@/actions/type' | ||
import { ArticleSection } from '@prisma/client' | ||
|
||
export default async function destroy(name: string) : Promise<ActionReturn<ArticleSection>> { | ||
try { | ||
const articleSection = await prisma.articleSection.delete({ | ||
where: { name }, | ||
}) | ||
return { success: true, data: articleSection } | ||
} catch (error) { | ||
return errorHandler(error) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const maxSections = 10 // Max 10 sections in an article |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@use '@/styles/ohma'; | ||
|
||
|
||
.AddParts { | ||
z-index: 1; | ||
display: flex; | ||
button { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
&:hover { | ||
cursor: pointer; | ||
} | ||
} | ||
} |
Oops, something went wrong.