Skip to content

Commit

Permalink
Server Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rakib committed Feb 26, 2023
1 parent 128fb1e commit 420b7b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions components/board.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import List from './list';
import React, { useState, useContext, useEffect } from 'react';
import { capitalizeAllWords, dev, formatDate, generateUniqueID, StateContext } from '../pages/_app';
import { DragDropContext, Droppable, generateId, onDragStart } from 'react-beautiful-dnd';
import { DragDropContext, Droppable, onDragStart } from 'react-beautiful-dnd';

function Board(props) {
const [updates, setUpdates] = useState(0);
Expand Down Expand Up @@ -305,7 +305,7 @@ function Board(props) {
</div>
</section>
{board?.columnOrder && (
<Droppable droppableId={`boardColumns${generateId}`} direction="horizontal" type="column">
<Droppable droppableId={`boardColumns${generateUniqueID()}`} direction="horizontal" type="column">
{(provided, snapshot) => (
<section id={`board`} className={`board lists container ${snapshot.isDraggingOver ? `isDraggingOver` : ``} ${board?.columnOrder && (board?.columnOrder.length == 2 ? `clipColumns` : board?.columnOrder.length == 3 ? `threeBoard overflowingBoard` : board?.columnOrder.length > 3 ? `moreBoard overflowingBoard` : ``)}`} ref={provided.innerRef} {...provided.droppableProps} style={props.style}>
{board?.columnOrder && board?.columnOrder.map((columnId, index) => {
Expand Down
2 changes: 0 additions & 2 deletions pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Document, { Html, Head, Main, NextScript } from 'next/document';
import { AnimatePresence, motion } from 'framer-motion';
import { generateUniqueID } from './_app';

export default class MyDocument extends Document {
static async getInitialProps(ctx) {
Expand Down
7 changes: 4 additions & 3 deletions theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import { DocsThemeConfig } from 'nextra-theme-docs';

const setToc = (e) => {
let toc = document.querySelector(`.nextra-toc`);
toc.classList.toggle(`minimized`);

toc.classList.contains(`minimized`) ? localStorage.setItem(`tocMinimized`, JSON.stringify(true)) : localStorage.setItem(`tocMinimized`, JSON.stringify(false));
if (toc) {
toc.classList.toggle(`minimized`);
toc.classList.contains(`minimized`) ? localStorage.setItem(`tocMinimized`, JSON.stringify(true)) : localStorage.setItem(`tocMinimized`, JSON.stringify(false));
}
}

const config: DocsThemeConfig = {
Expand Down

1 comment on commit 420b7b5

@vercel
Copy link

@vercel vercel bot commented on 420b7b5 Feb 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.