mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: format with prettier
This commit is contained in:
parent
03fb09c3d6
commit
a147ad6610
164 changed files with 11257 additions and 8154 deletions
|
|
@ -1,40 +1,47 @@
|
|||
"use client";
|
||||
import React from "react";
|
||||
import { createNewOrganization } from "../../../services/organizations/orgs";
|
||||
'use client'
|
||||
import React from 'react'
|
||||
import { createNewOrganization } from '../../../services/organizations/orgs'
|
||||
|
||||
const Organizations = () => {
|
||||
const [name, setName] = React.useState("");
|
||||
const [description, setDescription] = React.useState("");
|
||||
const [email, setEmail] = React.useState("");
|
||||
const [slug, setSlug] = React.useState("");
|
||||
const [name, setName] = React.useState('')
|
||||
const [description, setDescription] = React.useState('')
|
||||
const [email, setEmail] = React.useState('')
|
||||
const [slug, setSlug] = React.useState('')
|
||||
|
||||
const handleNameChange = (e: any) => {
|
||||
setName(e.target.value);
|
||||
};
|
||||
setName(e.target.value)
|
||||
}
|
||||
|
||||
const handleDescriptionChange = (e: any) => {
|
||||
setDescription(e.target.value);
|
||||
};
|
||||
setDescription(e.target.value)
|
||||
}
|
||||
|
||||
const handleEmailChange = (e: any) => {
|
||||
setEmail(e.target.value);
|
||||
};
|
||||
setEmail(e.target.value)
|
||||
}
|
||||
|
||||
const handleSlugChange = (e: any) => {
|
||||
setSlug(e.target.value);
|
||||
};
|
||||
setSlug(e.target.value)
|
||||
}
|
||||
|
||||
const handleSubmit = async (e: any) => {
|
||||
e.preventDefault();
|
||||
|
||||
e.preventDefault()
|
||||
|
||||
let logo = ''
|
||||
const status = await createNewOrganization({ name, description, email, logo, slug, default: false });
|
||||
alert(JSON.stringify(status));
|
||||
};
|
||||
const status = await createNewOrganization({
|
||||
name,
|
||||
description,
|
||||
email,
|
||||
logo,
|
||||
slug,
|
||||
default: false,
|
||||
})
|
||||
alert(JSON.stringify(status))
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="font-bold text-lg">New Organization</div>
|
||||
<div className="font-bold text-lg">New Organization</div>
|
||||
Name: <input onChange={handleNameChange} type="text" />
|
||||
<br />
|
||||
Description: <input onChange={handleDescriptionChange} type="text" />
|
||||
|
|
@ -45,7 +52,7 @@ const Organizations = () => {
|
|||
<br />
|
||||
<button onClick={handleSubmit}>Create</button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export default Organizations;
|
||||
export default Organizations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue