mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-26 17:04:29 -03:00
bun run format
This commit is contained in:
+3
-10
@@ -19,21 +19,14 @@ export const addPost = (post: Post) => {
|
||||
posts.update((current) => [post, ...current]);
|
||||
};
|
||||
|
||||
export const updatePostStore = (
|
||||
postId: string,
|
||||
updatedData: Partial<Post>
|
||||
) => {
|
||||
export const updatePostStore = (postId: string, updatedData: Partial<Post>) => {
|
||||
posts.update((current) =>
|
||||
current.map((post) =>
|
||||
post.id === postId ? { ...post, ...updatedData } : post
|
||||
)
|
||||
current.map((post) => (post.id === postId ? { ...post, ...updatedData } : post))
|
||||
);
|
||||
};
|
||||
|
||||
export const removePost = (postId: string) => {
|
||||
posts.update((current) =>
|
||||
current.filter((post) => post.id !== postId)
|
||||
);
|
||||
posts.update((current) => current.filter((post) => post.id !== postId));
|
||||
};
|
||||
|
||||
export const resetPosts = () => {
|
||||
|
||||
Reference in New Issue
Block a user