feat: refactor the entire learnhouse project

This commit is contained in:
swve 2023-10-13 20:03:27 +02:00
parent f556e41dda
commit 4c215e91d5
247 changed files with 7716 additions and 1013 deletions

View file

@ -1,51 +0,0 @@
"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 handleNameChange = (e: any) => {
setName(e.target.value);
};
const handleDescriptionChange = (e: any) => {
setDescription(e.target.value);
};
const handleEmailChange = (e: any) => {
setEmail(e.target.value);
};
const handleSlugChange = (e: any) => {
setSlug(e.target.value);
};
const handleSubmit = async (e: any) => {
e.preventDefault();
let logo = ''
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>
Name: <input onChange={handleNameChange} type="text" />
<br />
Description: <input onChange={handleDescriptionChange} type="text" />
<br />
Slug: <input onChange={handleSlugChange} type="text" />
<br />
Email Address: <input onChange={handleEmailChange} type="text" />
<br />
<button onClick={handleSubmit}>Create</button>
</div>
);
};
export default Organizations;