-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add button to allow community owners to restore their deleted c…
…ommunities
- Loading branch information
Showing
4 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"use client"; | ||
import { undeleteAction } from "@/app/communities/communityActions"; | ||
import { MyUserInfo } from "lemmy-js-client"; | ||
import { SubmitButton } from "@/app/(ui)/button/SubmitButton"; | ||
|
||
export const UndeleteButton = (props: { | ||
readonly loggedInUser: MyUserInfo | undefined; | ||
readonly communityId: number; | ||
readonly communityName: string; | ||
}) => { | ||
return ( | ||
<form | ||
action={undeleteAction.bind(null, props.communityId, props.communityName)} | ||
> | ||
<SubmitButton className={"ml-auto w-full max-w-[267px]"} color={"danger"}> | ||
{"Restore community"} | ||
</SubmitButton> | ||
</form> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters