mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
Reorder categories (#12)
* feat: add next category id column * feat: reorder categories (front) * refactor: remove dead code & some optimization * feat(wip): add order column + sql request + trigger * refactor: fix warnings * fix: syntax error in migration * feat: create sql query (category reorder) * feat: use prisma generated types instead * feat: create some react context with hooks * refactor: move a lot of code from home page to dedicated components * refactor: extend generated prisma types * refactor: use hooks and move links footer in dedicated component * refactor: fix bad types used * fix: warnings caused by setState loop * feat: use nextid instead of order column * fix: reorder categories (front) * fix: sort categories by nextId * feat: prevent send update request if cat.id equal target.id * fix: reorganization applied even if there is no change * chore: remove unused en var * feat: check if nextid category exist * chore: sql query for migration * refactor: remove useless code and prevent sending request when category not moving * fix: redorder categories when sending request
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import LinkTag from 'next/link';
|
||||
import PageTransition from 'components/PageTransition';
|
||||
import styles from 'styles/legal-pages.module.scss';
|
||||
import clsx from 'clsx';
|
||||
import Navbar from 'components/Navbar/Navbar';
|
||||
import { getServerSideTranslation } from '../i18n';
|
||||
import PageTransition from 'components/PageTransition';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { TFunctionParam } from 'types/i18next';
|
||||
import { DefaultSeo } from 'next-seo';
|
||||
import LinkTag from 'next/link';
|
||||
import styles from 'styles/legal-pages.module.scss';
|
||||
import { getServerSideTranslation } from '../i18n';
|
||||
|
||||
export default function Privacy() {
|
||||
const { t } = useTranslation('privacy');
|
||||
@@ -17,9 +16,7 @@ export default function Privacy() {
|
||||
<Navbar />
|
||||
<main>
|
||||
<h1>{t('privacy:title')}</h1>
|
||||
<p>
|
||||
{t('privacy:edited_at', { date: '19/11/2023' } as TFunctionParam)}
|
||||
</p>
|
||||
<p>{t('privacy:edited_at', { date: '19/11/2023' })}</p>
|
||||
<p>{t('privacy:welcome')}</p>
|
||||
|
||||
<h2>{t('privacy:collect.title')}</h2>
|
||||
@@ -29,11 +26,9 @@ export default function Privacy() {
|
||||
<h3>{t('privacy:collect.user.title')}</h3>
|
||||
<p>{t('privacy:collect.user.description')}</p>
|
||||
<ul>
|
||||
{(
|
||||
t('privacy:collect.user.fields', {
|
||||
returnObjects: true,
|
||||
} as TFunctionParam) as Array<string>
|
||||
).map((field) => (
|
||||
{t('privacy:collect.user.fields', {
|
||||
returnObjects: true,
|
||||
}).map((field) => (
|
||||
<li key={field}>{field}</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user