mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Fixed tailwindcss and layout.
This commit is contained in:
parent
9767a78b78
commit
1f980bb813
4 changed files with 60 additions and 8 deletions
|
@ -83,6 +83,8 @@
|
|||
"etherpad-lite": "node/server.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.4.17",
|
||||
"postcss": "^8.4.35",
|
||||
"@types/async": "^3.2.24",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/http-errors": "^2.0.4",
|
||||
|
|
|
@ -1,10 +1,32 @@
|
|||
import 'tailwindcss/tailwind.css'
|
||||
import {connect} from 'socket.io-client'
|
||||
import {useEffect} from "react";
|
||||
|
||||
export const Admin = ()=>{
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const socket = connect('/settings')
|
||||
|
||||
socket.on('connect', () => {
|
||||
socket.emit('load');
|
||||
});
|
||||
|
||||
socket.on('disconnect', (reason) => {
|
||||
// The socket.io client will automatically try to reconnect for all reasons other than "io
|
||||
// server disconnect".
|
||||
if (reason === 'io server disconnect') socket.connect();
|
||||
});
|
||||
|
||||
socket.on('settings', (settings) => {
|
||||
console.log(settings)
|
||||
})
|
||||
}, []);
|
||||
|
||||
|
||||
return(
|
||||
<div>
|
||||
<h1 className="text-red-50">Admin12345</h1>
|
||||
</div>
|
||||
<h1 className="">Admin1234</h1>
|
||||
)
|
||||
}
|
||||
|
||||
export default Admin
|
||||
export default Admin
|
||||
|
|
28
src/pages/admin/layout.tsx
Normal file
28
src/pages/admin/layout.tsx
Normal file
|
@ -0,0 +1,28 @@
|
|||
import {FC} from "react";
|
||||
import packageJson from '../../../package.json';
|
||||
|
||||
type Repo = {
|
||||
name: string
|
||||
}
|
||||
|
||||
import { Metadata } from 'next'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Home',
|
||||
description: 'Welcome to Next.js',
|
||||
}
|
||||
|
||||
type RootLayoutProps = {
|
||||
children: React.ReactNode|React.ReactNode[]
|
||||
}
|
||||
|
||||
|
||||
const RootLayout:FC<RootLayoutProps> = ({children})=>{
|
||||
|
||||
return <div>
|
||||
{children}
|
||||
{packageJson.name}
|
||||
</div>
|
||||
}
|
||||
|
||||
export default RootLayout
|
|
@ -2,9 +2,9 @@ import type { Config } from "tailwindcss";
|
|||
|
||||
const config: Config = {
|
||||
content: [
|
||||
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
|
@ -17,4 +17,4 @@ const config: Config = {
|
|||
},
|
||||
plugins: [],
|
||||
};
|
||||
export default config;
|
||||
export default config;
|
||||
|
|
Loading…
Reference in a new issue