Skip to content

Commit

Permalink
style: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
laslows committed Oct 12, 2024
1 parent 8d92adf commit faa4b2e
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 32 deletions.
11 changes: 8 additions & 3 deletions src/actions/groups/committees/read.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
'use server'
import { createActionError } from '@/actions/error'
import { getUser } from '@/auth/getUser'
import { readCommittee, readCommitteeArticle, readCommitteeParagraph, readCommittees } from '@/services/groups/committees/read'
import {
readCommittee,
readCommitteeArticle,
readCommitteeParagraph,
readCommittees
} from '@/services/groups/committees/read'
import { safeServerCall } from '@/actions/safeServerCall'
import type { ExpandedArticle } from '@/services/cms/articles/Types'
import type { ExpandedCommittee, ExpandedCommitteeWithCover } from '@/services/groups/committees/Types'
import type { ActionReturn } from '@/actions/Types'
import { ExpandedArticle } from '@/services/cms/articles/Types'
import { CmsParagraph } from '@prisma/client'
import type { CmsParagraph } from '@prisma/client'

/**
* Reads all committees
Expand Down
2 changes: 1 addition & 1 deletion src/app/_components/Cms/Article/Article.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function Article({ article, coverImageClass, hideCoverImage = fal
</SlideInOnView>
</span>
)}
<article className={noMargin ? styles.noMargin: undefined}>
<article className={noMargin ? styles.noMargin : undefined}>
{
article.articleSections.length ? (
article.articleSections.sort((a, b) => (a.order - b.order)).map((section, i) => (
Expand Down
2 changes: 1 addition & 1 deletion src/app/committees/[shortName]/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import Link from 'next/link'
import styles from './Nav.module.scss'
import Link from 'next/link'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faArrowLeft, faCog, faInfo, faUsers } from '@fortawesome/free-solid-svg-icons'
import { usePathname } from 'next/navigation'
Expand Down
2 changes: 1 addition & 1 deletion src/app/committees/[shortName]/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { readCommitteeArticleAction } from '@/actions/groups/committees/read'
import styles from './page.module.scss'
import { readCommitteeArticleAction } from '@/actions/groups/committees/read'
import Article from '@/components/Cms/Article/Article'

export type PropTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/committees/[shortName]/admin/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styles from './page.module.scss'
import getCommittee from '@/app/committees/[shortName]/getCommittee'
import CmsImage from '@/components/Cms/CmsImage/CmsImage'
import type { PropTypes } from '@/app/committees/[shortName]/page'
import styles from './page.module.scss'

export default async function ComitteeAdmin({ params }: PropTypes) {
const committee = await getCommittee(params)
Expand Down
6 changes: 3 additions & 3 deletions src/app/committees/[shortName]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import getCommitee from './getCommittee'
import Nav from './Nav'
import styles from './layout.module.scss'
import { readSpecialImageAction } from '@/actions/images/read'
import BackdropImage from '@/components/BackdropImage/BackdropImage'
import PageWrapper from '@/components/PageWrapper/PageWrapper'
import CommitteeImage from '@/components/CommitteeImage/CommitteeImage'
import { ReactNode } from 'react'
import Nav from './Nav'
import styles from './layout.module.scss'
import type { ReactNode } from 'react'

export type PropTypes = {
params: {
Expand Down
6 changes: 3 additions & 3 deletions src/app/committees/[shortName]/members/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default function CommiteeMembers() {
return (
<div>Comm</div>
)
return (
<div>Comm</div>
)
}
2 changes: 1 addition & 1 deletion src/app/committees/[shortName]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { readCommitteeArticleAction, readCommitteeParagraphAction } from '@/actions/groups/committees/read'
import styles from './page.module.scss'
import { readCommitteeParagraphAction } from '@/actions/groups/committees/read'
import CmsParagraph from '@/app/_components/Cms/CmsParagraph/CmsParagraph'

export type PropTypes = {
Expand Down
22 changes: 10 additions & 12 deletions src/app/committees/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import styles from './page.module.scss'
import CommitteeCard from '@/components/CommitteeCard/CommitteeCard'
import PageWrapper from '@/components/PageWrapper/PageWrapper'
import { readCommitteesAction } from '@/actions/groups/committees/read'
import Link from 'next/link'
import { readSpecialImageAction } from '@/actions/images/read'

export default async function Committees() {
Expand All @@ -19,16 +17,16 @@ export default async function Committees() {
{
committees.length ? (
<div className={styles.committeeList}>
{
committees.map((committee) => (
<CommitteeCard
key={committee.id}
title={committee.name}
href={`/committees/${committee.shortName}`}
image={committee.logoImage.image || standardCommitteeLogo}
/>
))
}
{
committees.map((committee) => (
<CommitteeCard
key={committee.id}
title={committee.name}
href={`/committees/${committee.shortName}`}
image={committee.logoImage.image || standardCommitteeLogo}
/>
))
}
</div>

) : (
Expand Down
1 change: 0 additions & 1 deletion src/prisma/prismaservice/src/development/seedDevGroups.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { PrismaClient } from '@/generated/pn'
import { create } from 'domain'

export default async function seedDevGroups(prisma: PrismaClient) {
const user = await prisma.user.findUnique({
Expand Down
4 changes: 2 additions & 2 deletions src/services/groups/committees/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { readSpecialImage } from '@/services/images/read'
import { prismaCall } from '@/services/prismaCall'
import { createArticle } from '@/services/cms/articles/create'
import { readCurrentOmegaOrder } from '@/services/omegaOrder/read'
import { createCmsParagraph } from '@/services/cms/paragraphs/create'
import type { ExpandedCommittee } from './Types'
import type { CreateCommitteeTypes } from './validation'
import { createCmsParagraph } from '@/services/cms/paragraphs/create'

export async function createCommittee(rawdata: CreateCommitteeTypes['Detailed']): Promise<ExpandedCommittee> {
const { name, shortName, logoImageId } = createCommitteeValidation.detailedValidate(rawdata)
Expand All @@ -16,7 +16,7 @@ export async function createCommittee(rawdata: CreateCommitteeTypes['Detailed'])
}
const article = await createArticle({})

const paragraph = await createCmsParagraph({name: `Paragraph for ${name}`})
const paragraph = await createCmsParagraph({ name: `Paragraph for ${name}` })

const order = (await readCurrentOmegaOrder()).order

Expand Down
6 changes: 3 additions & 3 deletions src/services/groups/committees/read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import prisma from '@/prisma'
import { prismaCall } from '@/services/prismaCall'
import { ServerError } from '@/services/error'
import { articleRealtionsIncluder } from '@/services/cms/articles/ConfigVars'
import type { ExpandedCommittee, ExpandedCommitteeWithArticle, ExpandedCommitteeWithCover } from './Types'
import { ExpandedArticle } from '@/services/cms/articles/Types'
import { CmsImage, CmsParagraph } from '@prisma/client'
import type { ExpandedArticle } from '@/services/cms/articles/Types'
import type { CmsParagraph } from '@prisma/client'
import type { ExpandedCommittee, ExpandedCommitteeWithCover } from './Types'

export async function readCommittees(): Promise<ExpandedCommittee[]> {
return await prismaCall(() => prisma.committee.findMany({
Expand Down

0 comments on commit faa4b2e

Please sign in to comment.